﻿<%@ Page Title="المستخدمين" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="CountryDepth.Web.Users" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="hiddenUserId" runat="server" />
    <table width="100%">
        <tr>
            <td width="20%">
                <asp:Label ID="lblUsers" runat="server" Text="المستخدمون" />
                <br />
                <asp:UpdatePanel ID="UsersListUpdatePanel" runat="server">
                    <ContentTemplate>
                        <asp:ListBox ID="lstUsers" runat="server" Width="100%" Height="450px" OnSelectedIndexChanged="lstUsers_SelectedIndexChanged" AutoPostBack="true" />
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnNewUser" />
                        <asp:AsyncPostBackTrigger ControlID="btnSaveUser" />
                    </Triggers>
                </asp:UpdatePanel>

                <hr />
                <div align="center">
                    <asp:ImageButton ID="btnNewUser" runat="server" ImageUrl="Images/new.png" AlternateText="مستخدم جديد" OnClick="btnNewUser_Click" />
                    <asp:ImageButton ID="btnSaveUser" runat="server" ImageUrl="Images/save.png" AlternateText="حفظ بيانات المستخدم الحالي" OnClick="btnSaveUser_Click" />
                </div>

            </td>
            <td width="80%">
                <asp:UpdatePanel ID="UserDataUpdatePanel" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="pnlUserDetails" runat="server" GroupingText="بيانات المستخدم">
                            <table width="100%">
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblFullName" runat="server" Text="الاسم بالكامل" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtFullName" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblUserName" runat="server" Text="اسم المستخدم" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtUserName" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblPassword" runat="server" Text="كلمة السر" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPassword" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblTelephone" runat="server" Text="رقم التليفون" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtTelephone" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblMobile" runat="server" Text="رقم المحمول" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtMobile" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblEmail" runat="server" Text="البريد الإلكتروني" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEmail" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblAddress" runat="server" Text="العنوان" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblManager" runat="server" Text="المدير" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlManager" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblInitialAnnualBalance" runat="server" Text="عدد الأجازات الإعتيادية / السنة" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtInitialAnnualBalance" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblInitialCasualBalance" runat="server" Text="عدد الأجازات العارضة / السنة" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtInitialCasualBalance" runat="server" Width="50%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblWorkDays" runat="server" Text="أيام العمل الأسبوعية" />
                                    </td>
                                    <td>
                                        <asp:CheckBox ID="chkIsFriWork" runat="server" Text="الجمعة" />
                                        <br />
                                        <asp:CheckBox ID="chkIsSatWork" runat="server" Text="السبت" />
                                        <br />
                                        <asp:CheckBox ID="chkIsSunWork" runat="server" Text="الأحد" />
                                        <br />
                                        <asp:CheckBox ID="chkIsMonWork" runat="server" Text="الاثنين" />
                                        <br />
                                        <asp:CheckBox ID="chkIsTueWork" runat="server" Text="الثلاثاء" />
                                        <br />
                                        <asp:CheckBox ID="chkIsWedWork" runat="server" Text="الأربعاء" />
                                        <br />
                                        <asp:CheckBox ID="chkIsThuWork" runat="server" Text="الخميس" />
                                        <br />

                                    </td>
                                </tr>
                                <tr>
                                    <td width="30%">
                                        <asp:Label ID="lblWorkingHoursPerDay" runat="server" Text="عدد ساعات العمل اليومية" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtWorkingHoursPerDay" runat="server" Width="50%" />
                                    </td>
                                </tr>

                            </table>


                        </asp:Panel>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnNewUser" />
                        <asp:AsyncPostBackTrigger ControlID="btnSaveUser" />
                        <asp:AsyncPostBackTrigger ControlID="lstUsers" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>
